import request from '@/utils/request'

const api = {
  queryMomOrderUrl: '/u8/query_mom_order_u8',
  syncMomOrderUrl: '/u8/sync_mom_order_u8',
  syncU8BomUrl: '/u8/sync_u8_bom',
  syncMomOrderU8ListUrl: '/u8/sync_mom_order_u8_list',
  syncU8BomListUrl: '/u8/sync_u8_bom_list',
}

export async function syncU8BomListApi(data: Map<string, any>) {
  const res = await request({
    url: api.syncU8BomListUrl,
    method: 'post',
    data,
    timeout: 300000,
  })
  return res
}

export async function syncMomOrderU8ListApi(data: Map<string, any>) {
  const res = await request({
    url: api.syncMomOrderU8ListUrl,
    method: 'post',
    data,
    timeout: 300000,
  })
  return res
}

export async function syncU8BomApi(params: Map<string, any>) {
  const res = await request({
    url: api.syncU8BomUrl,
    method: 'get',
    params,
  })
  return res
}

export async function syncMomOrderApi(data: Map<string, any>) {
  const res = await request({
    url: api.syncMomOrderUrl,
    method: 'post',
    data,
  })
  return res
}

export async function queryMomOrderApi(data: Map<string, any>) {
  const res = await request({
    url: api.queryMomOrderUrl,
    method: 'post',
    data,
  })
  return res
}
